home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / p_pascal.zip / SAMPLES / RANGE.PAS < prev    next >
Pascal/Delphi Source File  |  1989-04-22  |  1KB  |  36 lines

  1. (*$c+*)
  2. PROGRAM Something(input,output);
  3.  
  4. {Original version of this program submitted
  5.  by Sten Ljungkvist of SAAB-SCANIA, Sweden.
  6.  This is a demonstration of European ASCII
  7.  letters in Pascal identifiers.  To type these
  8.  letters, use a "copy con yourfile", and hold
  9.  down the "alt" key while typing the three-digit
  10.  ASCII value of the letter on the numeric keypad.
  11.  When you release the "alt" key, the letter will
  12.  appear on your screen. }
  13.  
  14. CONST
  15.     lägsta = 0;    {ä = alt 132}
  16.     första = 0;    {ö = alt 148}
  17.     högsta = 9999;
  18. TYPE
  19.     Ångström = 2000 .. 10000; {Å = alt 143; ö = alt 148}
  20.     intword = lägsta .. högsta;
  21. VAR
  22.     üçêñ : Ångström; {These are some sample letters:
  23.               ü = alt 129; ç = alt 135;
  24.               ê = alt 136; ñ = alt 164}
  25.     index : intword;
  26. BEGIN
  27.     {Note that specifying output in a WRITE is optional:}
  28.     writeln(output,'Something or another!'); writeln;
  29.     FOR index := högsta-10 TO högsta DO
  30.     BEGIN
  31.      üçêñ := index;
  32.      writeln(' This is the value of üçêñ[',
  33.         (högsta-index) : 2, ']: ', üçêñ : 5)
  34.     END
  35. END.
  36.